package com.tang.controller;

import com.tang.sys.ResponseResult;
import com.tang.sys.service.ICategoryService;
import com.tang.sys.vo.CategoryVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/blog/category")
public class BlogCategoryController {
    @Autowired
    private ICategoryService iCategoryService;

    //查询所有分类的标签
    @GetMapping("/listAllCategory")
    public ResponseResult bloglistAllCategory(){
        List<CategoryVo> list = iCategoryService.bloglistAllCategory();
        return ResponseResult.okResult(list);
    }

}
